package com.anji.hyperneat.onlinereinforcement;

import com.anji.hyperneat.nd.NDFloatArray;
import com.anji.hyperneat.nd.NDFloatArray.MatrixIterator;
import com.anji.nn.activationfunction.ActivationFunction;

public class ActivatorNdLrFacade implements ActivatorNDLR {

	NDFloatArray inputs;
	NDFloatArray outputs;
	int[] outputDimensions;
	String name;
	
	public ActivatorNdLrFacade(int[] inputDimensions, int[] outputDimensions) {
		this.outputDimensions = outputDimensions;
		this.outputs = new NDFloatArray(outputDimensions);
		this.inputs = new NDFloatArray(inputDimensions);
	}
	
	@Override
	public long cost() {return 0;}

	@Override
	public int getConnectionCount(boolean includeBias) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void setInputs(NDFloatArray inputs) {this.inputs = inputs;}

	@Override
	public NDFloatArray getInputs() {return inputs;}

	@Override
	public NDFloatArray getLayer(int layer) {return null;}

	@Override
	public NDFloatArray getOutputs() {
		for (MatrixIterator it = outputs.iterator(); it.hasNext(); it.next()) 
			it.set((float) Math.random());
		return outputs;
	}

	@Override
	public int getNumLayers() {return 2;}

	@Override
	public boolean isFeedForward() {return true;}

	@Override
	public NDFloatArray next(NDFloatArray stimuli) {
		this.inputs = stimuli;
		return getOutputs();
	}

	@Override
	public NDFloatArray[] nextSequence(NDFloatArray[] stimuli) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void reset() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String string) {this.name = string;}

	@Override
	public int[] getInputDimension() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int[] getOutputDimension() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public NDFloatArray[] getWeights() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public NDFloatArray[] getBias() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public NDFloatArray[] getLayers() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ActivationFunction getActivationFunction() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public float getWeightLearningRate(int layer, int... coords) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public float getBiasLearningRate(int layer, int... coords) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public LearningRateGranularity getLearningRateGranularity() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void decayLearningRates() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public NDFloatArray[] getWeightLearningRates() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public NDFloatArray[] getBiasLearningRates() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public NDFloatArray[] getWeightLearningRateDecays() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public NDFloatArray[] getBiasLearningRateDecays() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public float getWeightLearningRateDecay(int layer, int... coords) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public float getBiasLearningRateDecay(int layer, int... coords) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public ActivatorNdLrFacade clone() {
		ActivatorNdLrFacade a = new ActivatorNdLrFacade(this.inputs.getDimensions(), outputDimensions);
		a.inputs = this.inputs.clone();
		a.outputs = this.outputs.clone();
		a.name = this.name;
		return a;
	}

}
